package org.video.mine.utils;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;

public class DataUtils {
    private static long ONEHOUR = 1*60*60*1000;
    private static long ONEMINITE = 1*60*1000;
    private static long ONESECOND = 1000;
    public static String timeToString(long time) {
        SimpleDateFormat sdf;
        if (time>ONEHOUR){
            sdf = new SimpleDateFormat("HH:mm:ss");
        }else
            {
            sdf = new SimpleDateFormat("mm:ss");
        }
        sdf.setTimeZone(TimeZone.getTimeZone("GTM"));
        Date startDate = new Date(time);
        String timeFormat = sdf.format(startDate);
        return timeFormat;
    }
}
